package cloud.xlh.agent;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/6/4 15:55
 * @ Description:
 */
public class ClassUtility {
    public static String getWrapClass(Class<?> basicType) {
        if (basicType.equals(int.class) || basicType.equals(Integer.class)) {
            return Integer.class.getName();
        }
        if (basicType.equals(byte.class) || basicType.equals(Byte.class)) {
            return Byte.class.getName();
        }
        if (basicType.equals(short.class) || basicType.equals(Short.class)) {
            return Short.class.getName();
        }
        if (basicType.equals(long.class) || basicType.equals(Long.class)) {
            return Long.class.getName();
        }
        if (basicType.equals(float.class) || basicType.equals(Float.class)) {
            return Float.class.getName();
        }
        if (basicType.equals(double.class) || basicType.equals(Double.class)) {
            return Double.class.getName();
        }
        if (basicType.equals(char.class) || basicType.equals(Character.class)) {
            return Character.class.getName();
        }
        if (basicType.equals(boolean.class) || basicType.equals(Boolean.class)) {
            return Boolean.class.getName();
        }
        if (basicType.equals(String.class)) {
            return String.class.getName();
        }
        if (basicType.equals(String[].class)) {
            return String.class.getName() + " []";
        }
        return basicType.getName();
    }
}
